angular.module('WebService', ['ngRoute', 'ngResource']).
        config(function ($routeProvider) {
            $routeProvider.
                    when('/', {templateUrl: '/views/home.html'}).
                    when('/formulaire', {controller: FormulaireCtrl, templateUrl: '/views/create_user.html'}).
                    when('/read', {controller: ReadCtrl, templateUrl: '/views/read_user.html'}).
                    otherwise({redirectTo: '/'});
        });

function FormulaireCtrl($scope) {

}

function ReadCtrl($scope, $resource) {
    var Post = $resource ('http://localhost:8080/com.camara.jersey/user');
    $scope.data = Post.query();
}

function HomeCtrl($scope) {
    $scope.data = "data";
}
